const NODE_ENV = process.env.NODE_ENV || 'development'
const CONFIG = process.env.CONFIG || ''

var argv = require('yargs').argv;


let prodModule = argv.module
if(!prodModule) throw new Error('please set --module {you prod module name}, \n like [ yarn start --module {you prod module name} ]')
else prodModule = prodModule.replace(/^-module=/, '');

module.exports = {
  module:prodModule,
  /** The environment to use when building the project */
  env: NODE_ENV,
  envConfig: CONFIG,
  /** The full path to the project's root directory */
  basePath: __dirname,
  /** The name of the directory containing the application source code */
  srcDir: 'src/'+prodModule,
  srcPublic: 'src/'+'Public/',
  /** The file name of the application's entry point */
  main: 'main',
  /** The name of the directory in which to emit compiled assets */
  outDir: 'dist/'+prodModule,
  /** The base path for all projects assets (relative to the website root) */
  publicPath: '', // 静态资源路径配置，一般用于类似CDN的需要
  /** Whether to generate sourcemaps */
  sourcemaps: CONFIG == 'withmap',
  /** A hash map of keys that the compiler should treat as external to the project */
  externals: {},
  /** A hash map of variables and their values to expose globally */
  globals: {},
  /** Whether to enable verbose logging */
  verbose: false,
  /** The list of modules to bundle separately from the core application code */
}
